//
//  AdMoreSplash.h
//  AdMoreSDKDemo
//
//  Created by Hayder on 2023/5/8.
//  开屏广告

#import "AdMoreBaseAd.h"

NS_ASSUME_NONNULL_BEGIN

@class AdMoreSplashAd;
@protocol AdMoreSplashAdDelegate <NSObject>

@optional
/// 加载成功回调
- (void)splashAdDidLoad:(AdMoreSplashAd *)splashAd;
/// 加载失败回调
- (void)splashAd:(AdMoreSplashAd *)splashAd didFailWithError:(NSError *)error;
/// 展示成功回调
- (void)splashAdWillVisible:(AdMoreSplashAd *)splashAd;
//展示失败
- (void)splashAdDidShowFailed:(AdMoreSplashAd *)splashAd error:(NSError *)error;
/// 广告点击回调
- (void)splashAdDidClick:(AdMoreSplashAd *)splashAd;
/// 广告关闭回调
- (void)splashAdDidClose:(AdMoreSplashAd *)splashAd;
@end

@interface AdMoreSplashAd : AdMoreBaseAd

@property (nonatomic, strong, readonly) NSString *slotID;
//appID
@property (nonatomic, strong, readonly) NSString *appID;
//代码位Id
@property (nonatomic, strong, readonly) NSString *ritID;
@property (nonatomic, strong, readonly) UIViewController *rootViewController;

@property (nonatomic, weak) id<AdMoreSplashAdDelegate> delegate;

/**
 slotID: 广告位ID
 */
- (instancetype)initWithSlotID:(NSString *)slotID ritId:(NSString *)ritID rootViewController:(UIViewController *)rootViewController;

/**开始加载广告**/
- (void)loadADData;

/**广告加载完成后展示*/
- (void)showSplashAdInRootViewController:(UIViewController *)viewController;

@end

NS_ASSUME_NONNULL_END
